home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / dejagnu.lha / dejagnu-1.0.1 / expect / exp_tty.h < prev    next >
C/C++ Source or Header  |  1993-03-15  |  2KB  |  75 lines

  1. /* exp_tty.h - tty support definitions */
  2. /* Definitions for handling termio inclusion are localized here */
  3. /*
  4.  * Written by Rob Savoye <rob@cygnus.com>. Mon Feb 22 11:16:53 RMT 1993
  5.  */
  6.  
  7. #ifndef __EXP_TTY_H__
  8. #define __EXP_TTY_H__
  9.  
  10. #include "exp_conf.h"
  11.  
  12. /*
  13.  * Set up some macros to isolate tty differences
  14.  */
  15.  
  16. #if defined(HAVE_TERMIO) && !defined(HAVE_TERMIOS)
  17. #  include <termio.h>
  18. #  define TERMINAL termio
  19. /***
  20. #  define TCGETS    TCGETA
  21. #  define TCSETS    TCSETA
  22. #  define TCSETSW    TCSETAW
  23. #  define TCSETSF    TCSETAF
  24. ***/
  25. #endif
  26.  
  27. #if defined(HAVE_SGTTYB) && !defined(HAVE_TERMIOS)
  28. #  undef HAVE_TERMIO
  29. #  undef POSIX
  30. #  define TCGETS    TIOCGETP
  31. #  define TCSETS    TIOCSETP
  32. #  define TCSETSW    TIOCSETN
  33. #  define TERMINAL sgttyb
  34. #  ifdef HAVE_SYS_FCNTL_H
  35. #    include <sys/fcntl.h>
  36. #  else
  37. #    include <fcntl.h>
  38. #  endif
  39. #  include <sgtty.h>
  40. #  include <sys/ioctl.h>
  41. #endif
  42.  
  43. #if defined(HAVE_TERMIOS)
  44. #  undef HAVE_TERMIO
  45. #  undef HAVE_SGTTYB
  46. #  include <termios.h>
  47. #  define TERMINAL termios
  48. #  if !defined(TCGETS) || !defined(TCSETS)
  49. #    define TCGETS    TCGETA
  50. #    define TCSETS    TCSETA
  51. #    define TCSETSW    TCSETAW
  52. #    define TCSETSF    TCSETAF
  53. #  endif
  54. #endif
  55.  
  56. /* This section was written by: Don Libes, NIST, 2/6/90
  57.  
  58. Design and implementation of this program was paid for by U.S. tax
  59. dollars.  Therefore it is public domain.  However, the author and NIST
  60. would appreciate credit if this program or parts of it are used.
  61. */
  62. typedef struct TERMINAL exp_tty;
  63. extern exp_tty exp_tty_original;
  64.  
  65. extern int exp_dev_tty;
  66. extern int ioctled_devtty;
  67.  
  68. void exp_init_tty();
  69. void tty_raw();
  70. void tty_set();
  71. void tty_echo();
  72. int tty_raw_noecho();
  73.  
  74. #endif    /* __EXP_TTY_H__ */
  75.